<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../js/jquery-simplevalidator-1.0.js"></script>
<link rel="stylesheet" type="text/css" href="../css/common.css">
<link rel="stylesheet" type="text/css" href="../css/jquery-simplevalidator.css">
<script type="text/javascript">
	$(document).ready(function() {
		/* add self validator on sumbmit */
		$("#demoform").bindSimpleValidator(function() {
			var val = $("#ttnum").val();
			var valid = (val != "" && parseInt(val) > 10);
			if (!valid) {
				$("#ttnum").addValidError("must great than 10")
			}
			return valid;
		});
	});
</script>
</head>
<body>
	<input type="button" value="Back" onclick="history.back();">
	<div class="center">
		<h3>DEMO 1</h3>
		<br>
		<form action="submit.html" method="post" id="demoform">
			<div>
				text:
				<input type="text" name="tt" pattern="[\d]+" id="ttnum" maxlength="20" />
			</div>
			<div>
				<input type="submit" value="submit" />
			</div>
		</form>
	</div>
</body>
</html>